package training.oop.inheritance;

public class Parent {
	
	protected String name;
	
	String id;
	
	public Parent(){
		this.name="Nisha";
		this.id ="0001";
		System.out.println("Constructor without params");
	}
	
	public Parent(String name){
		this();
		this.name=name;
		System.out.println("Constructor with name param");
	}
	
	public Parent(String name, String id){
		this(name);
		
		
		this.id=id;
		System.out.println("Constructor with name, id params");
	
		
	}
	
	
	
	public void sayHelloFromParent(String name){
		this.name = name;
		System.out.println("Hello from Parent : " + this.getName());
		
		
	}
	
	protected String getName(){
		return this.name;
	}
	
	

}
